﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Home.aspx.cs" Inherits="WebTraderLite.Home" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Panel ID="Panel1" runat="server" Height="61px" style="text-align:center">              
        <div style='height:40px'>
            <div style="width:20%; float:left; text-align:right; margin-top:10px;">
                <asp:Label ID="lblSearch" runat="server" 
                    Text="Stock Symbol Search"></asp:Label>
            </div>

            <div style="width:50%; margin-left:20px; float:left; margin-top:10px;">
                <asp:TextBox ID="tbSearchSymbol" runat="server" 
                    style="z-index: 1; left: 525px; top: 140px;width: 470px;"></asp:TextBox>
            </div>       
            <div style="width:15%; margin-left:5px; float:left; margin-top:10px;">
                <asp:Button ID="btnSearch" runat="server" onclick="btnSearch_Click" 
                    Text="Search" />
            </div>
        </div>
           
        <div style='text-align:center'>        
            <%--Add placeholder to hold feedback if symbol isn't recognized--%>
            <asp:PlaceHolder ID="phFailSearch" runat="server"></asp:PlaceHolder>
        </div>
    </asp:Panel>


    <asp:Panel ID="Panel2" runat="server" Height="700px" Width="927px">
        <div style="width:55%; text-align:center; margin-left:auto; margin-right:auto;">
            <table>
            <tr>
            <td>
            <asp:Table ID="tblStockInfo" runat="server" ViewStateMode="Disabled" 
                Visible="False" 
                style="height: 65px; width: 100px; table-layout:auto; white-space:nowrap;">
                <asp:TableRow ID="tblRowSymbol" runat="server">
                    <asp:TableCell runat="server" Font-Bold="True">Symbol</asp:TableCell>
                </asp:TableRow>
                <asp:TableRow ID="tblRowCompany" runat="server">
                    <asp:TableCell runat="server" Font-Bold="True">Company</asp:TableCell>
                </asp:TableRow>
                <asp:TableRow ID="tblRowPrice" runat="server">
                    <asp:TableCell runat="server" Font-Bold="True">Price</asp:TableCell>
                </asp:TableRow>
                <asp:TableRow ID="tblRowShareNo" runat="server">
                    <asp:TableCell runat="server" Font-Bold="True" Wrap="true">Shares Outsanding</asp:TableCell>
                </asp:TableRow>
            </asp:Table>
            </td>
                <td><asp:HyperLink ID="hrefBuy" runat="server" Visible="false" Text="Buy"></asp:HyperLink></td>
                <td><asp:HyperLink ID="hrefAutoBuy" runat="server" Visible="false" Text="Auto-Buy"></asp:HyperLink></td>
                <td><asp:LinkButton ID="lbMonitor" runat="server" Visible="false" Text="Monitor" OnClick="lbMonitor_Click"></asp:LinkButton></td>
            </tr>                                       
        </table>
        </div>    
         
       
         
         <ajaxToolkit:ToolkitScriptManager ID="sm" runat="server"></ajaxToolkit:ToolkitScriptManager>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <span style="margin-left:auto; margin-right:auto">
                    <asp:PlaceHolder ID="phChartUnavailable" runat="server"></asp:PlaceHolder>
                </span>
            
            <!-- Graph Display -->
     
                <table style="margin-left:100px; margin-top:50px;">
                    <tr>
                       <td><asp:Button runat="server" ID="btn1Y" Text="1Y" Visible="false" 
                                onclick="btn1Y_Click"/></td>
                        <td><asp:Button runat="server" ID="btn6M" Text="6M" Visible="false" 
                                onclick="btn6M_Click"/></td>
                        <td><asp:Button runat="server" ID="btn3M" Text="3M" Visible="false" 
                                onclick="btn3M_Click"/></td>
                        <td><asp:Button runat="server" ID="btn1M" Text="1M" Visible="false" 
                                onclick="btn1M_Click"/></td>
                        <td><asp:Button runat="server" ID="btn1Wk" Text="1W" Visible="false" 
                                onclick="btn1Wk_Click"/></td>
                    </tr>
    
                </table>                                       
      
               <br />  
                <asp:Chart ID="stockChart" runat="server" Width="912px" Height="448px">
                    <series>
                        <asp:Series ChartType="Line" Name="seriesPriceHistory" YValueType="Single" XValueType="DateTime" ChartArea="chartAreaPriceHistory">
                        </asp:Series>

                        <asp:Series ChartType="Column" Name="seriesVolHistory" YValueType="Single" XValueType="DateTime" ChartArea="chartAreaVolume">
                        </asp:Series>
                    </series>
                    <chartareas>
                        <asp:ChartArea Name="chartAreaPriceHistory">
                        </asp:ChartArea>

                        <asp:ChartArea Name="chartAreaVolume">
                        </asp:ChartArea>
                    </chartareas>
                </asp:Chart>

        </ContentTemplate>


        </asp:UpdatePanel>



    </asp:Panel>



</asp:Content>
